Solution:
To check if a timing path violates setup and/or hold, we need to check if they satisfy setup and hold equations. A violating timing path has a negative setup/hold slack value.
The above circuit has a positive clock skew of 1 ns (as capture flip-flop gets clock 1 ns later than launch flip-flop).
Let us first check for setup violation. As we know, for a full cycle register-to-register timing path, setup equation is given as:
Tck->q + Tprop + Tsetup - Tskew < Tperiod
Here,
Tck->q = 2 ns, Tprop (max value of combinational propagation delay) = 4 ns, Tsetup = 1 ns, Tperiod = 10 ns, Tskew = 1 ns
Now, Tck->q + Tprop + Tsetup = 2 + 4 + 1 - 1 = 6 ns < TperiodSo, the above circuit does not have a setup violation. The setup slack, in this case, will be given as:
SS = Tperiod - (Tck->q + Tprop + Tsetup - Tskew)
SS = +4 nsSince, setup slack comes out to be positive, this path does not have a setup violation.
Now, let us check is there is a hold violation for this timing path. Hold timing equation is given as:
Tck->q + Tprop > Thold + Tskew
Here,
Tck->q = 2 ns, Tprop (min value of combinational propagation delay) = 2 ns, Thold = 2ns, Tskew = 1 ns
Now, Tck->q + Tprop = 2 ns + 2 ns = 4 ns
And Thold + Tskew = 2 ns + 1 ns = 3 nsNow, 4 ns > 3 ns, so this circuit does not have a hold violation. The hold slack, in this case, will be given as:
HS = Tck->q + Tprop - (Thold + Tskew) =Since, hold slack comes out to be positive, this path does not have a hold violation.+1 ns
Also read: